package com.infra.micro.id.api;

import com.infra.micro.id.fallback.IdHealthApiFallback;
import com.infra.common.resp.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Date;

@Component
@FeignClient(value = "micro-id-service", path = "/api/id/health", fallbackFactory = IdHealthApiFallback.class)
public interface IdHealthApi {
    /**
     * 心跳检查
     *
     * @return
     */
    @RequestMapping(value = "/heartBeat", method = RequestMethod.GET)
    Response<Date> heartBeat();
}
